package car.aistar.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class ReplypostExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public ReplypostExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andCreateRidIsNull() {
            addCriterion("create_rid is null");
            return (Criteria) this;
        }

        public Criteria andCreateRidIsNotNull() {
            addCriterion("create_rid is not null");
            return (Criteria) this;
        }

        public Criteria andCreateRidEqualTo(Long value) {
            addCriterion("create_rid =", value, "createRid");
            return (Criteria) this;
        }

        public Criteria andCreateRidNotEqualTo(Long value) {
            addCriterion("create_rid <>", value, "createRid");
            return (Criteria) this;
        }

        public Criteria andCreateRidGreaterThan(Long value) {
            addCriterion("create_rid >", value, "createRid");
            return (Criteria) this;
        }

        public Criteria andCreateRidGreaterThanOrEqualTo(Long value) {
            addCriterion("create_rid >=", value, "createRid");
            return (Criteria) this;
        }

        public Criteria andCreateRidLessThan(Long value) {
            addCriterion("create_rid <", value, "createRid");
            return (Criteria) this;
        }

        public Criteria andCreateRidLessThanOrEqualTo(Long value) {
            addCriterion("create_rid <=", value, "createRid");
            return (Criteria) this;
        }

        public Criteria andCreateRidIn(List<Long> values) {
            addCriterion("create_rid in", values, "createRid");
            return (Criteria) this;
        }

        public Criteria andCreateRidNotIn(List<Long> values) {
            addCriterion("create_rid not in", values, "createRid");
            return (Criteria) this;
        }

        public Criteria andCreateRidBetween(Long value1, Long value2) {
            addCriterion("create_rid between", value1, value2, "createRid");
            return (Criteria) this;
        }

        public Criteria andCreateRidNotBetween(Long value1, Long value2) {
            addCriterion("create_rid not between", value1, value2, "createRid");
            return (Criteria) this;
        }

        public Criteria andPidIsNull() {
            addCriterion("pid is null");
            return (Criteria) this;
        }

        public Criteria andPidIsNotNull() {
            addCriterion("pid is not null");
            return (Criteria) this;
        }

        public Criteria andPidEqualTo(Long value) {
            addCriterion("pid =", value, "pid");
            return (Criteria) this;
        }

        public Criteria andPidNotEqualTo(Long value) {
            addCriterion("pid <>", value, "pid");
            return (Criteria) this;
        }

        public Criteria andPidGreaterThan(Long value) {
            addCriterion("pid >", value, "pid");
            return (Criteria) this;
        }

        public Criteria andPidGreaterThanOrEqualTo(Long value) {
            addCriterion("pid >=", value, "pid");
            return (Criteria) this;
        }

        public Criteria andPidLessThan(Long value) {
            addCriterion("pid <", value, "pid");
            return (Criteria) this;
        }

        public Criteria andPidLessThanOrEqualTo(Long value) {
            addCriterion("pid <=", value, "pid");
            return (Criteria) this;
        }

        public Criteria andPidIn(List<Long> values) {
            addCriterion("pid in", values, "pid");
            return (Criteria) this;
        }

        public Criteria andPidNotIn(List<Long> values) {
            addCriterion("pid not in", values, "pid");
            return (Criteria) this;
        }

        public Criteria andPidBetween(Long value1, Long value2) {
            addCriterion("pid between", value1, value2, "pid");
            return (Criteria) this;
        }

        public Criteria andPidNotBetween(Long value1, Long value2) {
            addCriterion("pid not between", value1, value2, "pid");
            return (Criteria) this;
        }

        public Criteria andIsmpIsNull() {
            addCriterion("isMp is null");
            return (Criteria) this;
        }

        public Criteria andIsmpIsNotNull() {
            addCriterion("isMp is not null");
            return (Criteria) this;
        }

        public Criteria andIsmpEqualTo(Integer value) {
            addCriterion("isMp =", value, "ismp");
            return (Criteria) this;
        }

        public Criteria andIsmpNotEqualTo(Integer value) {
            addCriterion("isMp <>", value, "ismp");
            return (Criteria) this;
        }

        public Criteria andIsmpGreaterThan(Integer value) {
            addCriterion("isMp >", value, "ismp");
            return (Criteria) this;
        }

        public Criteria andIsmpGreaterThanOrEqualTo(Integer value) {
            addCriterion("isMp >=", value, "ismp");
            return (Criteria) this;
        }

        public Criteria andIsmpLessThan(Integer value) {
            addCriterion("isMp <", value, "ismp");
            return (Criteria) this;
        }

        public Criteria andIsmpLessThanOrEqualTo(Integer value) {
            addCriterion("isMp <=", value, "ismp");
            return (Criteria) this;
        }

        public Criteria andIsmpIn(List<Integer> values) {
            addCriterion("isMp in", values, "ismp");
            return (Criteria) this;
        }

        public Criteria andIsmpNotIn(List<Integer> values) {
            addCriterion("isMp not in", values, "ismp");
            return (Criteria) this;
        }

        public Criteria andIsmpBetween(Integer value1, Integer value2) {
            addCriterion("isMp between", value1, value2, "ismp");
            return (Criteria) this;
        }

        public Criteria andIsmpNotBetween(Integer value1, Integer value2) {
            addCriterion("isMp not between", value1, value2, "ismp");
            return (Criteria) this;
        }

        public Criteria andDisIdIsNull() {
            addCriterion("dis_id is null");
            return (Criteria) this;
        }

        public Criteria andDisIdIsNotNull() {
            addCriterion("dis_id is not null");
            return (Criteria) this;
        }

        public Criteria andDisIdEqualTo(Integer value) {
            addCriterion("dis_id =", value, "disId");
            return (Criteria) this;
        }

        public Criteria andDisIdNotEqualTo(Integer value) {
            addCriterion("dis_id <>", value, "disId");
            return (Criteria) this;
        }

        public Criteria andDisIdGreaterThan(Integer value) {
            addCriterion("dis_id >", value, "disId");
            return (Criteria) this;
        }

        public Criteria andDisIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("dis_id >=", value, "disId");
            return (Criteria) this;
        }

        public Criteria andDisIdLessThan(Integer value) {
            addCriterion("dis_id <", value, "disId");
            return (Criteria) this;
        }

        public Criteria andDisIdLessThanOrEqualTo(Integer value) {
            addCriterion("dis_id <=", value, "disId");
            return (Criteria) this;
        }

        public Criteria andDisIdIn(List<Integer> values) {
            addCriterion("dis_id in", values, "disId");
            return (Criteria) this;
        }

        public Criteria andDisIdNotIn(List<Integer> values) {
            addCriterion("dis_id not in", values, "disId");
            return (Criteria) this;
        }

        public Criteria andDisIdBetween(Integer value1, Integer value2) {
            addCriterion("dis_id between", value1, value2, "disId");
            return (Criteria) this;
        }

        public Criteria andDisIdNotBetween(Integer value1, Integer value2) {
            addCriterion("dis_id not between", value1, value2, "disId");
            return (Criteria) this;
        }

        public Criteria andRtextIsNull() {
            addCriterion("rtext is null");
            return (Criteria) this;
        }

        public Criteria andRtextIsNotNull() {
            addCriterion("rtext is not null");
            return (Criteria) this;
        }

        public Criteria andRtextEqualTo(String value) {
            addCriterion("rtext =", value, "rtext");
            return (Criteria) this;
        }

        public Criteria andRtextNotEqualTo(String value) {
            addCriterion("rtext <>", value, "rtext");
            return (Criteria) this;
        }

        public Criteria andRtextGreaterThan(String value) {
            addCriterion("rtext >", value, "rtext");
            return (Criteria) this;
        }

        public Criteria andRtextGreaterThanOrEqualTo(String value) {
            addCriterion("rtext >=", value, "rtext");
            return (Criteria) this;
        }

        public Criteria andRtextLessThan(String value) {
            addCriterion("rtext <", value, "rtext");
            return (Criteria) this;
        }

        public Criteria andRtextLessThanOrEqualTo(String value) {
            addCriterion("rtext <=", value, "rtext");
            return (Criteria) this;
        }

        public Criteria andRtextLike(String value) {
            addCriterion("rtext like", value, "rtext");
            return (Criteria) this;
        }

        public Criteria andRtextNotLike(String value) {
            addCriterion("rtext not like", value, "rtext");
            return (Criteria) this;
        }

        public Criteria andRtextIn(List<String> values) {
            addCriterion("rtext in", values, "rtext");
            return (Criteria) this;
        }

        public Criteria andRtextNotIn(List<String> values) {
            addCriterion("rtext not in", values, "rtext");
            return (Criteria) this;
        }

        public Criteria andRtextBetween(String value1, String value2) {
            addCriterion("rtext between", value1, value2, "rtext");
            return (Criteria) this;
        }

        public Criteria andRtextNotBetween(String value1, String value2) {
            addCriterion("rtext not between", value1, value2, "rtext");
            return (Criteria) this;
        }

        public Criteria andRtimeIsNull() {
            addCriterion("rtime is null");
            return (Criteria) this;
        }

        public Criteria andRtimeIsNotNull() {
            addCriterion("rtime is not null");
            return (Criteria) this;
        }

        public Criteria andRtimeEqualTo(Date value) {
            addCriterionForJDBCDate("rtime =", value, "rtime");
            return (Criteria) this;
        }

        public Criteria andRtimeNotEqualTo(Date value) {
            addCriterionForJDBCDate("rtime <>", value, "rtime");
            return (Criteria) this;
        }

        public Criteria andRtimeGreaterThan(Date value) {
            addCriterionForJDBCDate("rtime >", value, "rtime");
            return (Criteria) this;
        }

        public Criteria andRtimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("rtime >=", value, "rtime");
            return (Criteria) this;
        }

        public Criteria andRtimeLessThan(Date value) {
            addCriterionForJDBCDate("rtime <", value, "rtime");
            return (Criteria) this;
        }

        public Criteria andRtimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("rtime <=", value, "rtime");
            return (Criteria) this;
        }

        public Criteria andRtimeIn(List<Date> values) {
            addCriterionForJDBCDate("rtime in", values, "rtime");
            return (Criteria) this;
        }

        public Criteria andRtimeNotIn(List<Date> values) {
            addCriterionForJDBCDate("rtime not in", values, "rtime");
            return (Criteria) this;
        }

        public Criteria andRtimeBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("rtime between", value1, value2, "rtime");
            return (Criteria) this;
        }

        public Criteria andRtimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("rtime not between", value1, value2, "rtime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}